package data.missions;

import data.*;
import data.tileables.*;

public class PickUpWorkers extends Mission{
	private Rally rally;
	private Map map;
	private int numWorkers;
	public PickUpWorkers(Rally r, Map m, int numWork)
	{
		rally = r;
		map = m;
		numWorkers = numWork;
	}
	public int execute()
	{
		Structure s;
		s = map.getStructureAt(rally.getX(), rally.getY());
		if(s == null)
		{
			return 1;
		}
		else
		{
			rally.pickupWorker(numWorkers, s);
			return 1;
		}
	}
}
